const { Worker, isMainThread, parentPort, workerData } = require('worker_threads');
// const model = require('../../model/model.config')


async function run(workerData) {
    const { data, table } = workerData
    for (let item of data) {
        const { id, name, coord } = item
        // await model.getAList(`INSERT INTO ${table} set gw_name= '${name}',gw_code = '${id}',gw_x = ${coord[0]},gw_y = ${coord[1]}`);
        // console.log(item)
        // let sql = `INSERT INTO ${table} set ?`;
        // await model.addList(sql,table,item);
    }
    // console.log('已完成')
}
// run();

module.exports = run